/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Send-Message-Related-APIs
富媒体短信发送相关接口

OpenAPI spec version: v2
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKRms/RmsApiModel.h>


@implementation RmsQueryTemplateByIdRequest
-(id) initWithRegion:(NSString *)regionId
templateId:(NSString*)templateId { 
    self.regionId = regionId;
    self.templateId = templateId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
templateId:(NSString*)templateId { 
    self.regionId = regionId;
    self.version = version;
    self.templateId = templateId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.templateId = [dictionary objectForKey:@"templateId"];
    return self;
} 

@end
@implementation RmsQueryTemplateListRequest
-(id) initWithRegion:(NSString *)regionId
appId:(NSString*)appId
title:(NSString*)title
pageNum:(NSNumber*)pageNum
pageLimit:(NSNumber*)pageLimit
status:(NSString*)status
startTime:(NSString*)startTime
endTime:(NSString*)endTime { 
    self.regionId = regionId;
    self.appId = appId;
    self.title = title;
    self.pageNum = pageNum;
    self.pageLimit = pageLimit;
    self.status = status;
    self.startTime = startTime;
    self.endTime = endTime;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
appId:(NSString*)appId
title:(NSString*)title
pageNum:(NSNumber*)pageNum
pageLimit:(NSNumber*)pageLimit
status:(NSString*)status
startTime:(NSString*)startTime
endTime:(NSString*)endTime { 
    self.regionId = regionId;
    self.version = version;
    self.appId = appId;
    self.title = title;
    self.pageNum = pageNum;
    self.pageLimit = pageLimit;
    self.status = status;
    self.startTime = startTime;
    self.endTime = endTime;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self appId])
    {
        [result setValue:[self appId] forKey:@"appId"];
    }
    if([self title])
    {
        [result setValue:[self title] forKey:@"title"];
    }
    if([self pageNum])
    {
        [result setValue:[self pageNum] forKey:@"pageNum"];
    }
    if([self pageLimit])
    {
        [result setValue:[self pageLimit] forKey:@"pageLimit"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appId = [dictionary objectForKey:@"appId"];
    self.title = [dictionary objectForKey:@"title"];
    self.pageNum = [dictionary objectForKey:@"pageNum"];
    self.pageLimit = [dictionary objectForKey:@"pageLimit"];
    self.status = [dictionary objectForKey:@"status"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    return self;
} 

@end
@implementation RmsSendBatchMsgRequest
-(id) initWithRegion:(NSString *)regionId
appId:(NSString*)appId
templateId:(NSString*)templateId
phone:(NSArray<NSString*>*)phone
params:(NSArray<NSString*>*)params { 
    self.regionId = regionId;
    self.appId = appId;
    self.templateId = templateId;
    self.phone = phone;
    self.params = params;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
appId:(NSString*)appId
templateId:(NSString*)templateId
phone:(NSArray<NSString*>*)phone
params:(NSArray<NSString*>*)params { 
    self.regionId = regionId;
    self.version = version;
    self.appId = appId;
    self.templateId = templateId;
    self.phone = phone;
    self.params = params;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self appId])
    {
        [result setValue:[self appId] forKey:@"appId"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    if([self phone])
    {
        [result setValue:[self phone] forKey:@"phone"];
    }
    if([self params])
    {
        [result setValue:[self params] forKey:@"params"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appId = [dictionary objectForKey:@"appId"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    self.phone = [dictionary objectForKey:@"phone"];
    self.params = [dictionary objectForKey:@"params"];
    return self;
} 

@end
@implementation RmsQuerySendStatusRequest
-(id) initWithRegion:(NSString *)regionId
appId:(NSString*)appId
sequenceNumber:(NSString*)sequenceNumber
phone:(NSString*)phone { 
    self.regionId = regionId;
    self.appId = appId;
    self.sequenceNumber = sequenceNumber;
    self.phone = phone;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
appId:(NSString*)appId
sequenceNumber:(NSString*)sequenceNumber
phone:(NSString*)phone { 
    self.regionId = regionId;
    self.version = version;
    self.appId = appId;
    self.sequenceNumber = sequenceNumber;
    self.phone = phone;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self appId])
    {
        [result setValue:[self appId] forKey:@"appId"];
    }
    if([self sequenceNumber])
    {
        [result setValue:[self sequenceNumber] forKey:@"sequenceNumber"];
    }
    if([self phone])
    {
        [result setValue:[self phone] forKey:@"phone"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appId = [dictionary objectForKey:@"appId"];
    self.sequenceNumber = [dictionary objectForKey:@"sequenceNumber"];
    self.phone = [dictionary objectForKey:@"phone"];
    return self;
} 

@end
@implementation RmsAddTemplateRequest
-(id) initWithRegion:(NSString *)regionId
appId:(NSString*)appId
signType:(NSString*)signType
purpose:(NSString*)purpose
signCardType:(NSString*)signCardType
aptitudes:(NSString*)aptitudes
title:(NSString*)title
descriptionValue:(NSString*)descriptionValue
unsubscribe:(NSString*)unsubscribe
content:(NSArray<TemplateContent*>*)content { 
    self.regionId = regionId;
    self.appId = appId;
    self.signType = signType;
    self.purpose = purpose;
    self.signCardType = signCardType;
    self.aptitudes = aptitudes;
    self.title = title;
    self.descriptionValue = descriptionValue;
    self.unsubscribe = unsubscribe;
    self.content = content;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
appId:(NSString*)appId
signType:(NSString*)signType
purpose:(NSString*)purpose
signCardType:(NSString*)signCardType
aptitudes:(NSString*)aptitudes
title:(NSString*)title
descriptionValue:(NSString*)descriptionValue
unsubscribe:(NSString*)unsubscribe
content:(NSArray<TemplateContent*>*)content { 
    self.regionId = regionId;
    self.version = version;
    self.appId = appId;
    self.signType = signType;
    self.purpose = purpose;
    self.signCardType = signCardType;
    self.aptitudes = aptitudes;
    self.title = title;
    self.descriptionValue = descriptionValue;
    self.unsubscribe = unsubscribe;
    self.content = content;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self appId])
    {
        [result setValue:[self appId] forKey:@"appId"];
    }
    if([self signType])
    {
        [result setValue:[self signType] forKey:@"signType"];
    }
    if([self purpose])
    {
        [result setValue:[self purpose] forKey:@"purpose"];
    }
    if([self signCardType])
    {
        [result setValue:[self signCardType] forKey:@"signCardType"];
    }
    if([self aptitudes])
    {
        [result setValue:[self aptitudes] forKey:@"aptitudes"];
    }
    if([self title])
    {
        [result setValue:[self title] forKey:@"title"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self unsubscribe])
    {
        [result setValue:[self unsubscribe] forKey:@"unsubscribe"];
    }
    if([self content])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self content] count]; i++) {
            TemplateContent* item = [[self content] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"content"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appId = [dictionary objectForKey:@"appId"];
    self.signType = [dictionary objectForKey:@"signType"];
    self.purpose = [dictionary objectForKey:@"purpose"];
    self.signCardType = [dictionary objectForKey:@"signCardType"];
    self.aptitudes = [dictionary objectForKey:@"aptitudes"];
    self.title = [dictionary objectForKey:@"title"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.unsubscribe = [dictionary objectForKey:@"unsubscribe"];
    NSArray* contentArray = [dictionary objectForKey:@"content"];
    if(contentArray&&![contentArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [contentArray count];i++)
        {
        TemplateContent* item = [[TemplateContent alloc]initWithDic:[contentArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.content = propertyArray;
    }
    return self;
} 

@end
@implementation RmsQueryTemplateByIdResult
-(id) initWithData:(RespQueryTemplateListData*) data
        status:(NSNumber*)status
        code:(NSString*)code
        message:(NSString*)message { 
    self.data = data;               
    self.status = status;               
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[RespQueryTemplateListData alloc]initWithDic:[dictionary objectForKey:@"data"]];
    self.status = [dictionary objectForKey:@"status"];
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
@implementation RmsQueryTemplateListResult
-(id) initWithData:(RespTemplatePageResult*) data
        status:(NSNumber*)status
        code:(NSString*)code
        message:(NSString*)message { 
    self.data = data;               
    self.status = status;               
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[RespTemplatePageResult alloc]initWithDic:[dictionary objectForKey:@"data"]];
    self.status = [dictionary objectForKey:@"status"];
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
  
@implementation RmsQueryTemplateListResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RmsQueryTemplateListResult* result = [[RmsQueryTemplateListResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RmsQueryTemplateListResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RmsAddTemplateResult
-(id) initWithData:(RespTemplateData*) data
        status:(NSNumber*)status
        code:(NSString*)code
        message:(NSString*)message { 
    self.data = data;               
    self.status = status;               
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[RespTemplateData alloc]initWithDic:[dictionary objectForKey:@"data"]];
    self.status = [dictionary objectForKey:@"status"];
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
  
@implementation RmsAddTemplateResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RmsAddTemplateResult* result = [[RmsAddTemplateResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RmsAddTemplateResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RmsQueryTemplateByIdResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RmsQueryTemplateByIdResult* result = [[RmsQueryTemplateByIdResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RmsQueryTemplateByIdResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RmsQueryPackageRemainderResult
-(id) initWithData:(RespPackageResult*) data
        status:(NSNumber*)status
        code:(NSString*)code
        message:(NSString*)message { 
    self.data = data;               
    self.status = status;               
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[RespPackageResult alloc]initWithDic:[dictionary objectForKey:@"data"]];
    self.status = [dictionary objectForKey:@"status"];
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
@implementation RmsQueryPackageRemainderRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RmsQueryPackageRemainderResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RmsQueryPackageRemainderResult* result = [[RmsQueryPackageRemainderResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RmsQueryPackageRemainderResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RmsQuerySendStatusResult
-(id) initWithData:(NSArray<QuerySendStatus*>*) data
        status:(NSNumber*)status
        code:(NSString*)code
        message:(NSString*)message { 
    self.data = data;               
    self.status = status;               
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self data] count]; i++) {
            QuerySendStatus* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
        QuerySendStatus* item = [[QuerySendStatus alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    self.status = [dictionary objectForKey:@"status"];
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
  
@implementation RmsQuerySendStatusResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RmsQuerySendStatusResult* result = [[RmsQuerySendStatusResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RmsQuerySendStatusResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RmsSendBatchMsgResult
-(id) initWithData:(SendBatchMsg*) data
        status:(NSNumber*)status
        code:(NSString*)code
        message:(NSString*)message { 
    self.data = data;               
    self.status = status;               
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[SendBatchMsg alloc]initWithDic:[dictionary objectForKey:@"data"]];
    self.status = [dictionary objectForKey:@"status"];
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
  
@implementation RmsSendBatchMsgResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RmsSendBatchMsgResult* result = [[RmsSendBatchMsgResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RmsSendBatchMsgResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
